#ifndef GUIWP_MOTEUR_BASE_HPP 
#define GUIWP_MOTEUR_BASE_HPP 
namespace GUIWP
{

struct Moteur_Base
{
    virtual void drawSquare(int x1,int y1, int x2, int y2) =0;
    virtual void display()=0;  
    virtual void traiterEvent()=0;

    class Info
    {
	friend class Moteur_Base;

	bool m_closed;
	bool m_leftDown;
	int m_x,m_y;
    public:

	Info():m_closed(false),m_leftDown(false),m_x(0),m_y(0){}
	int x() const {return m_x;};
	int y() const {return m_y;};

	bool leftDown() const { return m_leftDown;}
	bool leftUp() const {return !m_leftDown;}

	bool closed() const {return m_closed;}
    };
    
protected: 
    Info m_info;
    void closeApp() {m_info.m_closed=true;}

    void setX(int x) {m_info.m_x=x;}
    void setY(int y) {m_info.m_y=y;}

    void setLeft(bool b) {m_info.m_leftDown=b;}

public:    const Info& infoInput() const {return m_info;}
};

}
#endif
